package com.mall.czlr.base.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public class BaseException extends RuntimeException {
    public static final int ERROR_SERVER = -1;
    public static final int ERROR_IN_INTERCEPTOR = -2;
    public static final int ERROR_IN_REQUEST = -3;

    public static final int ERROR_PARAM_NOT_SET = 1001;
    public static final int ERROR_AUTH_FAIL = 1002;
    public static final int ERROR_WRONG_PARAM = 1003;
    public static final int ERROR_NOT_EXISTS = 1004;
    public static final int ERROR_EXISTS = 1005;
    public static final int ERROR_NOT_ALLOWED = 1006;
    public static final int ERROR_FILE_UPLOAD = 1008;
    public static final int ERROR_CREATE_PASSWORD = 1009;
    public static final int ERROR_REQUEST_METHOD_NOT_SUPPORTED = 1010;
    public static final int ERROR_VALIDATE_CODE = 1011;

    private int code;
    private String message;
}
